import request from '@/utils/request'

// 查询灾害类别列表
export function listDamage(query) {
  return request({
    url: '/system/damage/list',
    method: 'get',
    params: query
  })
}

// 查询灾害类别详细
export function getDamage(id) {
  return request({
    url: '/system/damage/' + id,
    method: 'get'
  })
}

// 新增灾害类别
export function addDamage(data) {
  return request({
    url: '/system/damage',
    method: 'post',
    data: data
  })
}

// 修改灾害类别
export function updateDamage(data) {
  return request({
    url: '/system/damage',
    method: 'put',
    data: data
  })
}

// 删除灾害类别
export function delDamage(id) {
  return request({
    url: '/system/damage/' + id,
    method: 'delete'
  })
}
